package command;

import java.net.Socket;

import server.CommandFactories.CmdType;

import command.protobuf.MessageBufProtoBuf.RpcMessage;

public interface ICommand {
	/**
	 * execute the command and return the result. The return value is encapsulated in 
	 * the Message returned. User of this function is responsible for sending back the message
	 * @return
	 * 	Message:	return value of this function or exception raised
	 */
	public RpcMessage invoke();
	
	public CmdType getCommandType();
	public void setOrigin(RpcMessage origin, Socket socket);
}
